package com.evolver.datatest.component;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author wenl
 * @version V2.0
 * @project 自己的框架
 * @package com.evolver.datatest.component
 * @date 2020/3/25
 * @describe
 */

@Component
public class Scheduler2Task {

    private  static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");

//    @Scheduled(fixedRate = 6000)
    private void reportCurrentTime(){
        System.out.println("现在时间：" + dateFormat.format(new Date()));
    }

}
